//
//  InFeedBackViewController.m
//  我的管理
//
//  Created by brother on 16/3/3.
//  Copyright © 2016年 brother. All rights reserved.
//

#import "InFeedBackViewController.h"

@interface InFeedBackViewController ()

@property (weak, nonatomic) IBOutlet UITextView *optionTextField;

@end

@implementation InFeedBackViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    // Do any additional setup after loading the view from its nib.
}
- (IBAction)returned:(id)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (IBAction)finsishedBtnClick:(id)sender {
    
    if ([self.optionTextField.text isEqualToString:@""]) {
        UIAlertView *alter = [[UIAlertView alloc]initWithTitle:@"提示" message:@"意见内容不能为空" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
        [alter show];
    
    }else {
        UIAlertView *alter = [[UIAlertView alloc]initWithTitle:@"提示" message:@"意见提交中... " delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
        [alter show];
        [self dismissViewControllerAnimated:YES completion:nil];
    }
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
    
    if (buttonIndex == 0) {
        self.optionTextField.text =@"";
    }
  
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
